# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>

pkgname=xwallpaper
pkgver=0.7.4
pkgrel=1
pkgdesc='Wallpaper setting utility for X'
url='https://github.com/stoeckmann/xwallpaper'
arch=('loong64' 'x86_64')
license=('ISC')
depends=('pixman' 'libpng' 'libxpm' 'xcb-util' 'xcb-util-image' 'libjpeg-turbo'
         'libseccomp' libseccomp.so libpixman-1.so libjpeg.so)
options=('debug')
source=(https://github.com/stoeckmann/xwallpaper/releases/download/v${pkgver}/xwallpaper-${pkgver}.tar.xz{,.sig})
sha512sums=('f6eaf41befe724ad55d14f607bdfe9d05c79139054deb6590198ce767cf42173f068459dd894b284f3e8dbc95fc482d8ed7ed1c615f7b72b249897a6a01d51ba'
            'SKIP')
b2sums=('c10a69ab5734e43e99a746872bff427797e1d8f9de06d241fa81435036527b029031bb49733cf2119e8725883f20b9253b779ef9113d32d1b4f77bd73511a76a'
        'SKIP')
validpgpkeys=('CDB24BD3BDDCBCBBAE5CB6207DB470F35B0B8B18') # Tobias Stoeckmann <tobias@stoeckmann.org>

prepare() {
  cd ${pkgname}-${pkgver}
  autoreconf -fiv
}

build() {
  cd ${pkgname}-${pkgver}
  ./configure \
    --prefix=/usr \
    --with-zshcompletiondir=/usr/share/zsh/site-functions
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
  install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

# vim: ts=2 sw=2 et:
